<div id="left">
	Categories
	<div class="new-item"><a href="<?php echo site_url('admin/addNewCategory'); ?>">Add News Category</a></div>
	<ul>		
		<?php 
			foreach($categories as $category)
			{
				echo '<li><a href="'.site_url('admin/showNewsOfCategory/'.$category['id']).'">' .$category['category']. '</a>';
				echo '&nbsp; [<a href="'.site_url('admin/editNewCategory/'.$category['id']).'">Edit</a>]'.  '</li>';
			}
		?>
	</ul>
</div>
<div id="main">
	<h2>List of news</h2>
	<div class="new-item"><a href="<?php echo site_url('admin/addNew'); ?>">Add New</a></div>
	<table>
		<tr>
			<th>#</th>
			<th>Title</th>
			<th>Image</th>
			<th>Edit</th>		
		</tr>
		<?php
			foreach($news as $new)
			{
				$i = 1;
				echo '
					<tr align="center">
						<td>'.$i.'</td>						
						<td>'.$new['title'].'</td>					
						<td>'.$new['image'].'</td>
						<td><a href="'.site_url('admin/editNew/'.$new['id']).'">Edit</a></td>
					</tr>
				';
				$i++;
			}
		?>
	</table>
</div>
<div style="clear: both;"></div>